package persistence;

import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;

import entity.Venda;

public class VendaDao {
	
	Session session;
	Transaction transaction;
	Query query;
	Criteria criteria;
	
	public void cadastrar(Venda venda) throws Exception {
		session = HibernateUtil.getSessionFactory().openSession();
		transaction = session.beginTransaction();
		session.save(venda);
		transaction.commit();
		session.close();
	}
	
	

}
